package com.dannypatterson.airinstaller.events {
	
	import com.dannypatterson.airinstaller.UpdateManager;
	
	import flash.events.Event;
	
	/**
	 * @author Danny Patterson
	 */
	public class UpdateEvent extends Event {
		
		static public const REQUIRED_UPDATE_AVAILABLE:String = "requiredUpdateAvailable";
		static public const UPDATE_UNAVAILABLE:String = "updateUnavailable";
		static public const UPDATE_AVAILABLE:String = "updateAvailable";
		static public const UPDATE_READY:String = "updateReady";
		static public const CHECK_BEGIN:String = "checkBegin";
		static public const CHECK_COMPLETE:String = "checkComplete";
		static public const DOWNLOAD_BEGIN:String = "downloadBegin";
		static public const DOWNLOAD_COMPLETE:String = "downloadComplete";
		
		[Bindable]
		public var updateManager:UpdateManager;
		
		public function UpdateEvent(type:String, updateManager:UpdateManager, bubbles:Boolean = false, cancelable:Boolean = false) {
			super(type, bubbles, cancelable);
			this.updateManager = updateManager;
		}
		
		/**
		 * @see flash.events.Event#clone
		 */
		public override function clone():Event {
			return new UpdateEvent(type, updateManager, bubbles, cancelable);
		}
		
	}
	
}